package com.fastloan.mgt.customer.service;

import com.fastloan.mgt.customer.model.*;
import com.fastloan.mgt.customer.model.vo.*;
import com.fastloan.safe.mgt.user.model.CmuUser;
import com.kawins.base.BaseService;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author gelon createTime 2017/11/06
 */
public interface ZyCustomerService extends BaseService<ZyCustomer> {

    /**
     * 获取客户信息
     */
    List<CustomerExt> queryCustomerExt(Map<String, Object> map);

    /**
     * 新建客户 录入店铺信息
     */
    void addByStore(ZyCustomerStore zyCustomerStore, ZyCustomer zyCustome, MultipartFile file);

    /**
     * 新建客户 只添加手机信息
     */
    ZyCustomer addByPhone(String phone);

    /**
     * 获取客户所有维护信息
     */
    Map<String, Object> getCustomerInfo(String customerId);

    /**
     * 获取客户的营销信息
     */
    List<CustomerMarketionExt> queryCustomerMartion(Map<String, Object> map);

    /**
     * 更新客户信息
     */
    void updates(ZyCustomer customer, ZyCustomerBusiness customerBusiness,
        List<ZyCustomerFinancing> customerFinancings,
        ZyCustomerLoanDemand customerLoanDemand, ZyCustomerMarketion customerMarketion,
        ZyCustomerMyBank customerMyBank,
        List<ZyCustomerOtherBank> customerOtherBanks, ZyCustomerStore customerStore,
        MultipartFile file);

    /**
     * 查询存量客户
     */
    List<StockCustomer> queryStockCustomers(Map<String, Object> map);

    /**
     * 查询客户进件信息
     */
    List<CustomerAppExt> queryApp(Map<String, Object> map);

    /**
     * 绑定客户经理
     */
    CmuUser bindManager(String managerCode);

    /**
     * 极鲜网登录用户账号查询客户信息
     * @param userId
     * @return
     */
    ZyCustomer queryJxUserID(String userId);

    /**
     * 查询用户用信额度
     * @param customerId
     * @param productId
     * @return
     */
    BigDecimal queryCreditLimits(String customerId, String productId);

    /**
     * 根据客户id查询预授信进件id
     * @param applicationId
     * @return
     */
    String queryCreditApplicationIdByCustomer(String applicationId);

}
